package com.huixue.zdb.controller;


import com.huixue.zdb.ZdbApplication;
import com.huixue.zdb.pojo.Usertype;
import com.huixue.zdb.service.IUsertypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

/**
 * <p>
 * 用户角色类型表 前端控制器
 * </p>
 *
 * @author ZhouHuRun
 * @since 2020-09-23
 */
@RequestMapping("/usertype")
@RestController
public class UsertypeController {

     @Autowired
     private IUsertypeService UsertypeServiceImpl;

     //示列 http://localhost:8081/usertype/getbiy/1
     @GetMapping("getbiy/{id}")
     public String getBiy(){
         Usertype usertype = UsertypeServiceImpl.getById(1);
         System.out.println(usertype);
         return usertype.toString();
     }

    //示列：http://localhost:8081/usertype/postBiy
    @PostMapping("/postBiy")
    public String postBiy(Integer id){
        Usertype usertype = UsertypeServiceImpl.getById(id);
        System.out.println(usertype);
        return usertype.toString();
    }


}

